//
//  main.m
//  day1-demo3类的继承
//
//  Created by Maggie on 15/8/1.
//  Copyright (c) 2015年 fmning. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Circle.h"

int main(int argc, const char * argv[]) {
    
    Shape *s = [[Shape alloc]initWithColor:@"red"];
    [s draw];
    
    
    Circle *c = [[Circle alloc]initWithColor:@"yellow" andRadius:2.4];
    
    [c draw];
    
    NSObject *obj = c;
    id obj2 = c;
    //instancetype和id类似，都是指通用（任意）的对象类型
    //instancetype不能声明变量类型，一般作为方法的返回值类型
    //instancetype类型的对象在编译的时候会检测接口合法性
    //id在编译的时候不检测，运行时候检测
//    instancetype obj3 = c;

    return 0;
}





